// component/service-card/serviceCard.js
const app = getApp();
Component({
  options: {
    styleIsolation: 'isolated'
  },
  /**
   * 组件的属性列表
   */
  properties: {
    size: {
      type: String,
      value: 'middle'
    },
    name: {
      type: String,
      value: 'icon-house'
    },
    color: {
      type: String,
      value: 'orange'
    },
    title: {
      type: String,
      value: '我的房屋'
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    width: 0,
    height: 0,
    sizeMap: {
      middle: 30 //分三个
    }
  },
  lifetimes: {
    attached() {
      let width = (730 - this.data.sizeMap[this.properties.size] * 6) / 3;
      this.setData({
        width,
        height: width
      })
    }
  },
  /**
   * 组件的方法列表
   */
  methods: {

  }
})